package com.zhou.gof.group.abstractfactory.factory;

import com.zhou.gof.group.abstractfactory.abstractfactory.AnimalAbstractFactory;
import com.zhou.gof.group.abstractfactory.mammal.Mammal;
import com.zhou.gof.group.abstractfactory.mammal.impl.Cat;
import com.zhou.gof.group.abstractfactory.mammal.impl.Dog;
import com.zhou.gof.group.abstractfactory.reptile.Reptile;

/**
 * @author zhoudong
 * @title: MammalFactory
 * @projectName user-app
 * @description: 哺乳动物工厂
 * @date 2019/5/29 13:49
 */
public class MammalFactory extends AnimalAbstractFactory {
    @Override
    public Mammal getMammal(String mamal) {
        switch (mamal){
            case "cat":
                return new Cat();
            case "dog":
                return new Dog();
            default:
                return new Dog();
        }
    }

    @Override
    public Reptile getReptile(String reptile) {
        return null;
    }
}
